package com.ourteam.workspace.dao;

import java.util.Arrays;
import java.util.List;
import java.util.Map;
import net.dao.BaseQueryBean;
import net.dao.BaseWhereCriterion;
import net.dao.IDataAccessInterface;
import org.apache.commons.lang.StringUtils;

/**
 * Template Name : DAO查询对象 Template Version : 1 Template Last Modfiy Date : Sat Aug 19 10:06:32 CST
 * 2017 Auto Generate Date : 2018-11-30 18:42:29 Warning ! This file will be overwrite when
 * regenerate !
 */
public class ProjectWorkspaceRelateDAOQueryBean extends BaseQueryBean {

  public ProjectWorkspaceRelateDAOQueryBean() {
    super();
  }

  public ProjectWorkspaceRelateDAOQueryBean(BaseQueryBean aQueryBean) {
    super(aQueryBean);
  }

  public ProjectWorkspaceRelateDAOQueryBean(BaseQueryBean aQueryBean, Map tableReplaceMap) {
    super(aQueryBean, tableReplaceMap);
  }

  public Criteria createCriteria() {

    Criteria criteria = createCriteriaInternal();
    if (oredCriteria.size() == 0) {
      oredCriteria.add(criteria);
    }
    return criteria;
  }

  protected Criteria createCriteriaInternal() {
    return new Criteria(this);
  }

  public void addIdSelectProperty() {
    addIdSelectProperty("id");
  }

  public void addIdSelectProperty(String aAlias) {
    if (StringUtils.isNotBlank(aAlias)) {
      addSelectProperty(IProjectWorkspaceRelateDAO.Id, aAlias);
    } else {
      addSelectProperty(IProjectWorkspaceRelateDAO.Id, "id");
    }
  }

  public void addProjectIdSelectProperty() {
    addProjectIdSelectProperty("projectId");
  }

  public void addProjectIdSelectProperty(String aAlias) {
    if (StringUtils.isNotBlank(aAlias)) {
      addSelectProperty(IProjectWorkspaceRelateDAO.ProjectId, aAlias);
    } else {
      addSelectProperty(IProjectWorkspaceRelateDAO.ProjectId, "projectId");
    }
  }

  public void addWorkspaceIdSelectProperty() {
    addWorkspaceIdSelectProperty("workspaceId");
  }

  public void addWorkspaceIdSelectProperty(String aAlias) {
    if (StringUtils.isNotBlank(aAlias)) {
      addSelectProperty(IProjectWorkspaceRelateDAO.WorkspaceId, aAlias);
    } else {
      addSelectProperty(IProjectWorkspaceRelateDAO.WorkspaceId, "workspaceId");
    }
  }

  public void addAllSelectProperties() {

    addIdSelectProperty();

    addProjectIdSelectProperty();

    addWorkspaceIdSelectProperty();
  }

  public static class Criteria extends BaseWhereCriterion<ProjectWorkspaceRelateDAOQueryBean> {

    protected Criteria(ProjectWorkspaceRelateDAOQueryBean aParentObject) {
      super(aParentObject);
    }

    public Criteria andIdIsNull() {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " is null");
      return this;
    }

    public Criteria andIdIsNotNull() {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " is not null");
      return this;
    }

    public Criteria andIdIsNotEmpty() {
      addCriterion(
          IProjectWorkspaceRelateDAO.Id
              + " is not null AND "
              + IProjectWorkspaceRelateDAO.Id
              + " <> ''");
      return this;
    }

    public Criteria andIdIsEmpty() {
      addCriterion(
          "("
              + IProjectWorkspaceRelateDAO.Id
              + " is null OR "
              + IProjectWorkspaceRelateDAO.Id
              + " = '')");
      return this;
    }

    public Criteria andIdEqualTo(long value) {
      return andIdEqualTo(Long.valueOf(value));
    }

    public Criteria andIdEqualTo(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.Id + " = ", value, "id");
      return this;
    }

    public Criteria andIdEqualToForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.Id);
      str.append(" = ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andIdEqualTo(BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " = ", subQueryBean, dao);
      return this;
    }

    public Criteria andIdNotEqualTo(long value) {
      return andIdNotEqualTo(Long.valueOf(value));
    }

    public Criteria andIdNotEqualTo(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.Id + " <>", value, "id");
      return this;
    }

    public Criteria andIdNotEqualToOrIsNull(long value) {
      return andIdNotEqualToOrIsNull(Long.valueOf(value));
    }

    public Criteria andIdNotEqualToOrIsNull(java.lang.Long value) {

      addCriterion(
          IProjectWorkspaceRelateDAO.Id + " is null OR " + IProjectWorkspaceRelateDAO.Id + " <>",
          value,
          "id");
      return this;
    }

    public Criteria andIdNotEqualToForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.Id);
      str.append(" <> ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andIdNotEqualTo(BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " <> ", subQueryBean, dao);
      return this;
    }

    public Criteria andIdGreaterThan(long value) {
      return andIdGreaterThan(Long.valueOf(value));
    }

    public Criteria andIdGreaterThan(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.Id + " >", value, "id");
      return this;
    }

    public Criteria andIdGreaterThanForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.Id);
      str.append(" > ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andIdGreaterThan(BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " > ", subQueryBean, dao);
      return this;
    }

    public Criteria andIdGreaterThanOrEqualTo(long value) {
      return andIdGreaterThanOrEqualTo(Long.valueOf(value));
    }

    public Criteria andIdGreaterThanOrEqualTo(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.Id + " >=", value, "id");
      return this;
    }

    public Criteria andIdGreaterThanOrEqualToForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.Id);
      str.append(" >= ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andIdGreaterThanOrEqualTo(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " >= ", subQueryBean, dao);
      return this;
    }

    public Criteria andIdLessThan(long value) {
      return andIdLessThan(Long.valueOf(value));
    }

    public Criteria andIdLessThan(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.Id + " <", value, "id");
      return this;
    }

    public Criteria andIdLessThanForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.Id);
      str.append(" < ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andIdLessThan(BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " < ", subQueryBean, dao);
      return this;
    }

    public Criteria andIdLessThanOrEqualTo(long value) {
      return andIdLessThanOrEqualTo(Long.valueOf(value));
    }

    public Criteria andIdLessThanOrEqualTo(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.Id + " <=", value, "id");
      return this;
    }

    public Criteria andIdLessThanOrEqualToForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.Id);
      str.append(" <= ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andIdLessThanOrEqualTo(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " <= ", subQueryBean, dao);
      return this;
    }

    public Criteria andIdIn(long[] values) {
      if (values.length == 1) {
        return andIdEqualTo((java.lang.Long) values[0]);
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.Id + " in", values, "id");
        return this;
      }
    }

    public Criteria andIdNotIn(long[] values) {
      if (values.length == 1) {
        return andIdNotEqualTo((java.lang.Long) values[0]);
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.Id + " not in", values, "id");
        return this;
      }
    }

    public Criteria andIdIn(List<java.lang.Long> values) {

      if (values.size() == 1) {
        return andIdEqualTo(values.get(0));
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.Id + " in", values, "id");
        return this;
      }
    }

    public Criteria andIdNotIn(List<java.lang.Long> values) {
      if (values.size() == 1) {
        return andIdNotEqualTo(values.get(0));
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.Id + " not in", values, "id");
        return this;
      }
    }

    public Criteria andIdIn(java.lang.Long[] values) {

      if (values.length == 1) {
        return andIdEqualTo(values[0]);
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.Id + " in", Arrays.asList(values), "id");
        return this;
      }
    }

    public Criteria andIdNotIn(java.lang.Long[] values) {
      if (values.length == 1) {
        return andIdNotEqualTo(values[0]);
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.Id + " not in", Arrays.asList(values), "id");
        return this;
      }
    }

    public Criteria andIdIn(BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " in ", subQueryBean, dao);
      return this;
    }

    public Criteria andIdNotIn(BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " not in ", subQueryBean, dao);
      return this;
    }

    public Criteria andIdBetween(long value1, long value2) {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " between", value1, value2, "id");
      return this;
    }

    public Criteria andIdBetween(java.lang.Long value1, java.lang.Long value2) {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " between", value1, value2, "id");
      return this;
    }

    public Criteria andIdNotBetween(long value1, long value2) {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " not between", value1, value2, "id");
      return this;
    }

    public Criteria andIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
      addCriterion(IProjectWorkspaceRelateDAO.Id + " not between", value1, value2, "id");
      return this;
    }

    public Criteria andProjectIdIsNull() {
      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " is null");
      return this;
    }

    public Criteria andProjectIdIsNotNull() {
      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " is not null");
      return this;
    }

    public Criteria andProjectIdIsNotEmpty() {
      addCriterion(
          IProjectWorkspaceRelateDAO.ProjectId
              + " is not null AND "
              + IProjectWorkspaceRelateDAO.ProjectId
              + " <> ''");
      return this;
    }

    public Criteria andProjectIdIsEmpty() {
      addCriterion(
          "("
              + IProjectWorkspaceRelateDAO.ProjectId
              + " is null OR "
              + IProjectWorkspaceRelateDAO.ProjectId
              + " = '')");
      return this;
    }

    public Criteria andProjectIdEqualTo(long value) {
      return andProjectIdEqualTo(Long.valueOf(value));
    }

    public Criteria andProjectIdEqualTo(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " = ", value, "projectId");
      return this;
    }

    public Criteria andProjectIdEqualToForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.ProjectId);
      str.append(" = ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andProjectIdEqualTo(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " = ", subQueryBean, dao);
      return this;
    }

    public Criteria andProjectIdNotEqualTo(long value) {
      return andProjectIdNotEqualTo(Long.valueOf(value));
    }

    public Criteria andProjectIdNotEqualTo(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " <>", value, "projectId");
      return this;
    }

    public Criteria andProjectIdNotEqualToOrIsNull(long value) {
      return andProjectIdNotEqualToOrIsNull(Long.valueOf(value));
    }

    public Criteria andProjectIdNotEqualToOrIsNull(java.lang.Long value) {

      addCriterion(
          IProjectWorkspaceRelateDAO.ProjectId
              + " is null OR "
              + IProjectWorkspaceRelateDAO.ProjectId
              + " <>",
          value,
          "projectId");
      return this;
    }

    public Criteria andProjectIdNotEqualToForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.ProjectId);
      str.append(" <> ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andProjectIdNotEqualTo(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " <> ", subQueryBean, dao);
      return this;
    }

    public Criteria andProjectIdGreaterThan(long value) {
      return andProjectIdGreaterThan(Long.valueOf(value));
    }

    public Criteria andProjectIdGreaterThan(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " >", value, "projectId");
      return this;
    }

    public Criteria andProjectIdGreaterThanForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.ProjectId);
      str.append(" > ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andProjectIdGreaterThan(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " > ", subQueryBean, dao);
      return this;
    }

    public Criteria andProjectIdGreaterThanOrEqualTo(long value) {
      return andProjectIdGreaterThanOrEqualTo(Long.valueOf(value));
    }

    public Criteria andProjectIdGreaterThanOrEqualTo(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " >=", value, "projectId");
      return this;
    }

    public Criteria andProjectIdGreaterThanOrEqualToForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.ProjectId);
      str.append(" >= ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andProjectIdGreaterThanOrEqualTo(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " >= ", subQueryBean, dao);
      return this;
    }

    public Criteria andProjectIdLessThan(long value) {
      return andProjectIdLessThan(Long.valueOf(value));
    }

    public Criteria andProjectIdLessThan(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " <", value, "projectId");
      return this;
    }

    public Criteria andProjectIdLessThanForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.ProjectId);
      str.append(" < ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andProjectIdLessThan(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " < ", subQueryBean, dao);
      return this;
    }

    public Criteria andProjectIdLessThanOrEqualTo(long value) {
      return andProjectIdLessThanOrEqualTo(Long.valueOf(value));
    }

    public Criteria andProjectIdLessThanOrEqualTo(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " <=", value, "projectId");
      return this;
    }

    public Criteria andProjectIdLessThanOrEqualToForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.ProjectId);
      str.append(" <= ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andProjectIdLessThanOrEqualTo(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " <= ", subQueryBean, dao);
      return this;
    }

    public Criteria andProjectIdIn(long[] values) {
      if (values.length == 1) {
        return andProjectIdEqualTo((java.lang.Long) values[0]);
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " in", values, "projectId");
        return this;
      }
    }

    public Criteria andProjectIdNotIn(long[] values) {
      if (values.length == 1) {
        return andProjectIdNotEqualTo((java.lang.Long) values[0]);
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " not in", values, "projectId");
        return this;
      }
    }

    public Criteria andProjectIdIn(List<java.lang.Long> values) {

      if (values.size() == 1) {
        return andProjectIdEqualTo(values.get(0));
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " in", values, "projectId");
        return this;
      }
    }

    public Criteria andProjectIdNotIn(List<java.lang.Long> values) {
      if (values.size() == 1) {
        return andProjectIdNotEqualTo(values.get(0));
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " not in", values, "projectId");
        return this;
      }
    }

    public Criteria andProjectIdIn(java.lang.Long[] values) {

      if (values.length == 1) {
        return andProjectIdEqualTo(values[0]);
      } else {
        addCriterion(
            IProjectWorkspaceRelateDAO.ProjectId + " in", Arrays.asList(values), "projectId");
        return this;
      }
    }

    public Criteria andProjectIdNotIn(java.lang.Long[] values) {
      if (values.length == 1) {
        return andProjectIdNotEqualTo(values[0]);
      } else {
        addCriterion(
            IProjectWorkspaceRelateDAO.ProjectId + " not in", Arrays.asList(values), "projectId");
        return this;
      }
    }

    public Criteria andProjectIdIn(BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " in ", subQueryBean, dao);
      return this;
    }

    public Criteria andProjectIdNotIn(BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " not in ", subQueryBean, dao);
      return this;
    }

    public Criteria andProjectIdBetween(long value1, long value2) {
      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " between", value1, value2, "projectId");
      return this;
    }

    public Criteria andProjectIdBetween(java.lang.Long value1, java.lang.Long value2) {
      addCriterion(IProjectWorkspaceRelateDAO.ProjectId + " between", value1, value2, "projectId");
      return this;
    }

    public Criteria andProjectIdNotBetween(long value1, long value2) {
      addCriterion(
          IProjectWorkspaceRelateDAO.ProjectId + " not between", value1, value2, "projectId");
      return this;
    }

    public Criteria andProjectIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
      addCriterion(
          IProjectWorkspaceRelateDAO.ProjectId + " not between", value1, value2, "projectId");
      return this;
    }

    public Criteria andWorkspaceIdIsNull() {
      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " is null");
      return this;
    }

    public Criteria andWorkspaceIdIsNotNull() {
      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " is not null");
      return this;
    }

    public Criteria andWorkspaceIdIsNotEmpty() {
      addCriterion(
          IProjectWorkspaceRelateDAO.WorkspaceId
              + " is not null AND "
              + IProjectWorkspaceRelateDAO.WorkspaceId
              + " <> ''");
      return this;
    }

    public Criteria andWorkspaceIdIsEmpty() {
      addCriterion(
          "("
              + IProjectWorkspaceRelateDAO.WorkspaceId
              + " is null OR "
              + IProjectWorkspaceRelateDAO.WorkspaceId
              + " = '')");
      return this;
    }

    public Criteria andWorkspaceIdEqualTo(long value) {
      return andWorkspaceIdEqualTo(Long.valueOf(value));
    }

    public Criteria andWorkspaceIdEqualTo(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " = ", value, "workspaceId");
      return this;
    }

    public Criteria andWorkspaceIdEqualToForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.WorkspaceId);
      str.append(" = ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andWorkspaceIdEqualTo(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " = ", subQueryBean, dao);
      return this;
    }

    public Criteria andWorkspaceIdNotEqualTo(long value) {
      return andWorkspaceIdNotEqualTo(Long.valueOf(value));
    }

    public Criteria andWorkspaceIdNotEqualTo(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " <>", value, "workspaceId");
      return this;
    }

    public Criteria andWorkspaceIdNotEqualToOrIsNull(long value) {
      return andWorkspaceIdNotEqualToOrIsNull(Long.valueOf(value));
    }

    public Criteria andWorkspaceIdNotEqualToOrIsNull(java.lang.Long value) {

      addCriterion(
          IProjectWorkspaceRelateDAO.WorkspaceId
              + " is null OR "
              + IProjectWorkspaceRelateDAO.WorkspaceId
              + " <>",
          value,
          "workspaceId");
      return this;
    }

    public Criteria andWorkspaceIdNotEqualToForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.WorkspaceId);
      str.append(" <> ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andWorkspaceIdNotEqualTo(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " <> ", subQueryBean, dao);
      return this;
    }

    public Criteria andWorkspaceIdGreaterThan(long value) {
      return andWorkspaceIdGreaterThan(Long.valueOf(value));
    }

    public Criteria andWorkspaceIdGreaterThan(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " >", value, "workspaceId");
      return this;
    }

    public Criteria andWorkspaceIdGreaterThanForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.WorkspaceId);
      str.append(" > ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andWorkspaceIdGreaterThan(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " > ", subQueryBean, dao);
      return this;
    }

    public Criteria andWorkspaceIdGreaterThanOrEqualTo(long value) {
      return andWorkspaceIdGreaterThanOrEqualTo(Long.valueOf(value));
    }

    public Criteria andWorkspaceIdGreaterThanOrEqualTo(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " >=", value, "workspaceId");
      return this;
    }

    public Criteria andWorkspaceIdGreaterThanOrEqualToForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.WorkspaceId);
      str.append(" >= ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andWorkspaceIdGreaterThanOrEqualTo(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " >= ", subQueryBean, dao);
      return this;
    }

    public Criteria andWorkspaceIdLessThan(long value) {
      return andWorkspaceIdLessThan(Long.valueOf(value));
    }

    public Criteria andWorkspaceIdLessThan(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " <", value, "workspaceId");
      return this;
    }

    public Criteria andWorkspaceIdLessThanForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.WorkspaceId);
      str.append(" < ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andWorkspaceIdLessThan(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " < ", subQueryBean, dao);
      return this;
    }

    public Criteria andWorkspaceIdLessThanOrEqualTo(long value) {
      return andWorkspaceIdLessThanOrEqualTo(Long.valueOf(value));
    }

    public Criteria andWorkspaceIdLessThanOrEqualTo(java.lang.Long value) {

      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " <=", value, "workspaceId");
      return this;
    }

    public Criteria andWorkspaceIdLessThanOrEqualToForeignKey(java.lang.String key) {
      StringBuffer str = new StringBuffer(IProjectWorkspaceRelateDAO.WorkspaceId);
      str.append(" <= ").append(key);
      addForeignKeyCriterion(str.toString());
      return this;
    }

    public Criteria andWorkspaceIdLessThanOrEqualTo(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " <= ", subQueryBean, dao);
      return this;
    }

    public Criteria andWorkspaceIdIn(long[] values) {
      if (values.length == 1) {
        return andWorkspaceIdEqualTo((java.lang.Long) values[0]);
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " in", values, "workspaceId");
        return this;
      }
    }

    public Criteria andWorkspaceIdNotIn(long[] values) {
      if (values.length == 1) {
        return andWorkspaceIdNotEqualTo((java.lang.Long) values[0]);
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " not in", values, "workspaceId");
        return this;
      }
    }

    public Criteria andWorkspaceIdIn(List<java.lang.Long> values) {

      if (values.size() == 1) {
        return andWorkspaceIdEqualTo(values.get(0));
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " in", values, "workspaceId");
        return this;
      }
    }

    public Criteria andWorkspaceIdNotIn(List<java.lang.Long> values) {
      if (values.size() == 1) {
        return andWorkspaceIdNotEqualTo(values.get(0));
      } else {
        addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " not in", values, "workspaceId");
        return this;
      }
    }

    public Criteria andWorkspaceIdIn(java.lang.Long[] values) {

      if (values.length == 1) {
        return andWorkspaceIdEqualTo(values[0]);
      } else {
        addCriterion(
            IProjectWorkspaceRelateDAO.WorkspaceId + " in", Arrays.asList(values), "workspaceId");
        return this;
      }
    }

    public Criteria andWorkspaceIdNotIn(java.lang.Long[] values) {
      if (values.length == 1) {
        return andWorkspaceIdNotEqualTo(values[0]);
      } else {
        addCriterion(
            IProjectWorkspaceRelateDAO.WorkspaceId + " not in",
            Arrays.asList(values),
            "workspaceId");
        return this;
      }
    }

    public Criteria andWorkspaceIdIn(BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " in ", subQueryBean, dao);
      return this;
    }

    public Criteria andWorkspaceIdNotIn(
        BaseQueryBean subQueryBean, IDataAccessInterface<?, ?> dao) {
      addCriterion(IProjectWorkspaceRelateDAO.WorkspaceId + " not in ", subQueryBean, dao);
      return this;
    }

    public Criteria andWorkspaceIdBetween(long value1, long value2) {
      addCriterion(
          IProjectWorkspaceRelateDAO.WorkspaceId + " between", value1, value2, "workspaceId");
      return this;
    }

    public Criteria andWorkspaceIdBetween(java.lang.Long value1, java.lang.Long value2) {
      addCriterion(
          IProjectWorkspaceRelateDAO.WorkspaceId + " between", value1, value2, "workspaceId");
      return this;
    }

    public Criteria andWorkspaceIdNotBetween(long value1, long value2) {
      addCriterion(
          IProjectWorkspaceRelateDAO.WorkspaceId + " not between", value1, value2, "workspaceId");
      return this;
    }

    public Criteria andWorkspaceIdNotBetween(java.lang.Long value1, java.lang.Long value2) {
      addCriterion(
          IProjectWorkspaceRelateDAO.WorkspaceId + " not between", value1, value2, "workspaceId");
      return this;
    }
  }
}
